Optimal. Leaf size=239 \[ -\frac {8 a^4 (A+B) \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}-\frac {4 a^3 (A+B) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a^2 (A+B) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a (A+B) \cos (e+f x) (a+a \sin (e+f x))^{5/2}}{3 f \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.39, antiderivative size = 239, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3052, 2819,
2816, 2746, 31} \begin {gather*} -\frac {8 a^4 (A+B) \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}-\frac {4 a^3 (A+B) \cos (e+f x) \sqrt {a \sin (e+f x)+a}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a^2 (A+B) \cos (e+f x) (a \sin (e+f x)+a)^{3/2}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a (A+B) \cos (e+f x) (a \sin (e+f x)+a)^{5/2}}{3 f \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) (a \sin (e+f x)+a)^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2746
Rule 2816
Rule 2819
Rule 3052
Rubi steps
\begin {align*} \int \frac {(a+a \sin (e+f x))^{7/2} (A+B \sin (e+f x))}{\sqrt {c-c \sin (e+f x)}} \, dx &=-\frac {B \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}}+(A+B) \int \frac {(a+a \sin (e+f x))^{7/2}}{\sqrt {c-c \sin (e+f x)}} \, dx\\ &=-\frac {a (A+B) \cos (e+f x) (a+a \sin (e+f x))^{5/2}}{3 f \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}}+(2 a (A+B)) \int \frac {(a+a \sin (e+f x))^{5/2}}{\sqrt {c-c \sin (e+f x)}} \, dx\\ &=-\frac {a^2 (A+B) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a (A+B) \cos (e+f x) (a+a \sin (e+f x))^{5/2}}{3 f \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}}+\left (4 a^2 (A+B)\right ) \int \frac {(a+a \sin (e+f x))^{3/2}}{\sqrt {c-c \sin (e+f x)}} \, dx\\ &=-\frac {4 a^3 (A+B) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a^2 (A+B) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a (A+B) \cos (e+f x) (a+a \sin (e+f x))^{5/2}}{3 f \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}}+\left (8 a^3 (A+B)\right ) \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx\\ &=-\frac {4 a^3 (A+B) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a^2 (A+B) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a (A+B) \cos (e+f x) (a+a \sin (e+f x))^{5/2}}{3 f \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}}+\frac {\left (8 a^4 (A+B) c \cos (e+f x)\right ) \int \frac {\cos (e+f x)}{c-c \sin (e+f x)} \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=-\frac {4 a^3 (A+B) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a^2 (A+B) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a (A+B) \cos (e+f x) (a+a \sin (e+f x))^{5/2}}{3 f \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}}-\frac {\left (8 a^4 (A+B) \cos (e+f x)\right ) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,-c \sin (e+f x)\right )}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=-\frac {8 a^4 (A+B) \cos (e+f x) \log (1-\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}-\frac {4 a^3 (A+B) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a^2 (A+B) \cos (e+f x) (a+a \sin (e+f x))^{3/2}}{f \sqrt {c-c \sin (e+f x)}}-\frac {a (A+B) \cos (e+f x) (a+a \sin (e+f x))^{5/2}}{3 f \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) (a+a \sin (e+f x))^{7/2}}{4 f \sqrt {c-c \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.85, size = 183, normalized size = 0.77 \begin {gather*} -\frac {a^3 \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) (1+\sin (e+f x))^3 \sqrt {a (1+\sin (e+f x))} \left (-12 (8 A+15 B) \cos (2 (e+f x))+3 B \cos (4 (e+f x))+1536 (A+B) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+24 (29 A+36 B) \sin (e+f x)-8 (A+4 B) \sin (3 (e+f x))\right )}{96 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^7 \sqrt {c-c \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(670\) vs.
\(2(215)=430\).
time = 0.32, size = 671, normalized size = 2.81
method | result | size |
default | \(-\frac {\left (64 A +67 B +24 A \cos \left (f x +e \right )-67 B \sin \left (f x +e \right )-64 A \sin \left (f x +e \right )+45 B \cos \left (f x +e \right )-32 B \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right )+4 A \left (\cos ^{4}\left (f x +e \right )\right )-20 A \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right )-96 A \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-48 B \left (\cos ^{3}\left (f x +e \right )\right )-96 B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )+112 B \sin \left (f x +e \right ) \cos \left (f x +e \right )+192 B \cos \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+192 B \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-96 A \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )+192 A \cos \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+192 A \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-96 B \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-68 A \left (\cos ^{2}\left (f x +e \right )\right )-16 B \left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right )+3 B \left (\cos ^{5}\left (f x +e \right )\right )-4 A \left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right )+96 A \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-192 A \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+96 B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-192 B \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-80 B \left (\cos ^{2}\left (f x +e \right )\right )+3 B \sin \left (f x +e \right ) \left (\cos ^{4}\left (f x +e \right )\right )+13 B \left (\cos ^{4}\left (f x +e \right )\right )+88 A \sin \left (f x +e \right ) \cos \left (f x +e \right )-24 A \left (\cos ^{3}\left (f x +e \right )\right )\right ) \left (a \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {7}{2}}}{12 f \left (\cos ^{4}\left (f x +e \right )+\left (\cos ^{3}\left (f x +e \right )\right ) \sin \left (f x +e \right )+3 \left (\cos ^{3}\left (f x +e \right )\right )-4 \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right )-8 \left (\cos ^{2}\left (f x +e \right )\right )-4 \cos \left (f x +e \right ) \sin \left (f x +e \right )-4 \cos \left (f x +e \right )+8 \sin \left (f x +e \right )+8\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}\) | \(671\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 494 vs.
\(2 (231) = 462\).
time = 0.65, size = 494, normalized size = 2.07 \begin {gather*} \frac {2 \, \sqrt {2} \sqrt {a} {\left (\frac {6 \, {\left (\sqrt {2} A a^{3} \sqrt {c} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + \sqrt {2} B a^{3} \sqrt {c} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \log \left (-\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}{c \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {3 \, \sqrt {2} B a^{3} c^{\frac {7}{2}} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 2 \, \sqrt {2} A a^{3} c^{\frac {7}{2}} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 2 \, \sqrt {2} B a^{3} c^{\frac {7}{2}} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, \sqrt {2} A a^{3} c^{\frac {7}{2}} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, \sqrt {2} B a^{3} c^{\frac {7}{2}} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 6 \, \sqrt {2} A a^{3} c^{\frac {7}{2}} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 6 \, \sqrt {2} B a^{3} c^{\frac {7}{2}} \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{c^{4}}\right )}}{3 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{7/2}}{\sqrt {c-c\,\sin \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________